import React,{memo} from 'react'
//导入provider 通过Provider将store共享出去
//即组件可以拿到状态或者dispatch
import {Provider} from 'react-redux'

import HYAppHeader from "@/components/app-header"
import HYAppFooter from '@/components/app-footer'

import routes from './router'
import store from './store'

import {renderRoutes} from  'react-router-config'
import {HashRouter} from 'react-router-dom'
// React.memo的作用主要是用于缓存组件，使得组件可以按照业务的需求决定是否来更新的效果
export default memo(function App() {
    return (
        <Provider store={store}>
            <HashRouter>
                <HYAppHeader></HYAppHeader>
                    {renderRoutes(routes)}
                <HYAppFooter></HYAppFooter>
            </HashRouter>
        </Provider>
            
        
        
           
            
    
    )
})

